home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / x / xdmv1.3.lha / xdm / dd.doc < prev    next >
Text File  |  1992-06-30  |  7KB  |  198 lines

  1.  
  2.                                     dd
  3.                                     --
  4.              Documentation for version 1.1, on June 30th, 1992
  5.  
  6.                               by Bruno Costa
  7.  
  8.  
  9.  
  10. WARNING
  11.  
  12.   Although  this  program  is freely distributable (see COPYRIGHT below), I
  13. would  appreciate  if  you  take the time to write me a line or two (E-Mail
  14. please)  if  you  are  using  any of my programs or if you have any kind of
  15. ideas  or  suggestions  (This is not too much to ask, is it?).  If you feel
  16. particularly  generous,  I  would  like  to  receive a disk with any useful
  17. programs you have written, preferrably with source.  Thanks!
  18.  
  19.  
  20. DESCRIPTION
  21.  
  22.   dd  is  an  utility similar to Unix's dd.  It allows you to read or write
  23. data  blocks  from  any  device  supported by AmigaDOS.  It is fully system
  24. friendly,  and  uses  many features of Workbench 2.0 (which is required, by
  25. the way).  dd will copy the data it reads/writes from/to a device to/from a
  26. normal  AmigaDOS  file  in  any  other  device.  It can be used to backup a
  27. device  image  to  another device (like reading a whole partition of a hard
  28. disk  to  the  serial  port or to a magnetic tape) and later restore, or to
  29. test  for media errors or recover whatever data is readable from an invalid
  30. AmigaDOS  device.  It will also print all the information on a given device
  31. available from the operating system.
  32.  
  33.  
  34. OPTIONS
  35.  
  36.   usage: dd [-q] [-c<count>] [-s<skip>] -i<dev>|-r<dev>|-w<dev> <file>
  37.          -q = quiet operation
  38.          -c = amount to be read
  39.          -s = amount to be skipped before reading (relative to start of disk)
  40.          -i = just print OS information on given device and exit
  41.          -r = device to read data from
  42.          -w = device to write data to
  43.          -h = help (this message)
  44.  
  45.   dd  requires one of the following three options that define the operating
  46. modes to be present:
  47.  
  48.   i =  just  print all the information available from  the operating system
  49.   (both dos and exec) on the given device.
  50.  
  51.   r = read data from the given device and write it to the file <file>.
  52.  
  53.   w = write data to the given device that is read from file <file>.
  54.  
  55.   In the read and write modes, dd will print to the standard output an
  56. increasing count of blocks processed so far (over the total). This beaviour
  57. can be changed with the following option:
  58.  
  59.   q = suppresses any non-essential messages.
  60.  
  61.   In  both  read  and  write modes, the amount of data that will be read or
  62. written and the position in the device where the operation should start can
  63. be set with the following options:
  64.  
  65.   c = (count) set the amount of data that should be read/written.
  66.  
  67.   s = (skip) set the amount that should  be skipped  in the  device  before
  68.   reading or writing the real data (defaults to 0).
  69.  
  70.   Both of the amounts above can be followed by an optional unit specifier,
  71. which can be any of the following:
  72.  
  73.   B: blocks (this is the default unit)
  74.   s: sectors
  75.   b: bytes
  76.   k: kilobytes (kilo = 1024)
  77.   M: megabytes (mega = 1024*1024)
  78.  
  79.   Note  that  a sector means usually just a single block, but it can be any
  80. integral number of blocks.
  81.  
  82.  
  83. EXAMPLES
  84.  
  85.   To read the boot blocks of the floppy in drive 0 to the file foo:
  86.  
  87.   > dd -rdf0: -c2 foo
  88.  
  89.   To copy the disk in df0: to df1: (using a true pipe):
  90.  
  91.   > run dd -rdf0: -c1760 -q PIPE:ddtmp
  92.   > dd -wdf1: -c1760 PIPE:ddtmp
  93.  
  94.   To read all the data blocks from a 720k MS-DOS disk:
  95.  
  96.   > dd -rdi0: -c1426 -s14 data        ; using CrossDOS
  97.   > dd -rdf0: -c1426 -s14 data        ; using MultiDOS
  98.   > dd -rmd0: -c1426 -s14 data        ; using MessyDOS (???)
  99.  
  100.   To see how many blocks your hard drive partition DH0: uses:
  101.  
  102.   >dd -idh0:
  103.   |AmigaDOS information on device `dh0:':
  104.   |           Boot Priority: 0
  105.   |              Filesystem: 0x444F5301
  106.   |              Block size: 128 longwords
  107.   |       Sectors per Block: 1
  108.   |        Blocks per track: 70
  109.   |         Number of heads: 1
  110.   |              Interleave: 0
  111.   |       Starting cylinder: 237
  112.   |         Ending cylinder: 1280
  113.   |Blocks reserved at start: 2
  114.   |  Blocks reserved at end: 0
  115.   |       Number of buffers: 30
  116.   | Memory Type for Buffers: 0x0
  117.   |   Max bytes transferred: 16777215
  118.   |            Address Mask: 0xFFFFFFFC
  119.   |
  120.   |Exec information on device `scsi.device' (unit 6 with flags 0x0):
  121.   |          Device Version: 37
  122.   |         Device Revision: 19
  123.   |        Device Driver ID: scsidisk 37.19 (10.5.91)
  124.   |
  125.   |        (Further information not available)
  126.  
  127.   Since each cylinder contains as many tracks as there are heads, in this
  128. case the partition sizes are as follows:
  129.  
  130.   size in cylinders = 1280 - 237 + 1 = 1044 cylinders
  131.   size in tracks = 1044 * 1 = 1044 tracks
  132.   size in blocks = 1044 * 70 = 73080 blocks
  133.   size in bytes = 73080 * 128 = 9354240 longwords = 37.416.960 bytes
  134.  
  135.   The number of blocks in the device before the partition starts are:
  136.  
  137.   start = (237 - 1) * 1 * 70 = 16520
  138.  
  139.   To backup the above partition to a magnetic tape device (tape:):
  140.  
  141.   > dd -rdh0 -c73080 -s16520 tape:
  142.  
  143.   To read the volume label from an 880k Amiga floppy:
  144.  
  145.   > dd -s450992b -c1b -rdf0: size
  146.   > type size hex
  147.   | 0000: 0C            ; the label is 0x0C = 12 chars in lenght
  148.   > dd -s450993b -c12b -rdf0: label
  149.   > type label
  150.   | Workbench2.0        ; its the Workbench disk!
  151.  
  152.   Now  you  have a sophysticated -- but practical and easy-to-use -- way to
  153. know  the label of a floppy disk (no need to look at the worbench screen or
  154. type the info command anymore! ;-).
  155.  
  156.  
  157. BUGS
  158.  
  159.   It  should  be possible to read either from a device or file and write to
  160. any  other device or file orthogonally, i.e., it should be possible to read
  161. from  a  device  and  write  directly to another, or from a file to another
  162. (useless, but consistent).
  163.  
  164.   There  should  be  a  couple  of  extra  unit specifiers, like tracks and
  165. cylinders.
  166.  
  167.  
  168. AUTHOR
  169.  
  170.   The  accompanying  program  and  this documentation were written by Bruno
  171. Costa.  He can be reached in the following ways:
  172.  
  173.   E-Mail: bruno@impa.br        (InterNet)
  174.           bruno@BRLNCC.bitnet  (BitNet)
  175.  
  176.   Mail:   Bruno Costa
  177.           Rua Almirante Guilhem 454/102 bloco 1
  178.           Leblon - Rio de Janeiro
  179.           RJ 22440
  180.           BRAZIL
  181.  
  182.  
  183. COPYRIGHT
  184.  
  185.   This program is copyrighted by Bruno Costa.  It may be freely distributed
  186. if  and  only  if  the  documentation  and  the executables are provided in
  187. original form.  It may be included in Public Domain/Shareware compilations,
  188. like  the  one  organized  by  Fred  Fish, as long as just a nominal fee is
  189. charged  for  each  disk  (no  more  than  US$10 per disk), and may also be
  190. uploaded to BBS's or network services like BIX and CompuServe.
  191.  
  192.  
  193. DISCLAIMER
  194.  
  195.   The author makes no warranty of any kind with respect to this product and
  196. explicitly  disclaims  any implied warranties of merchantability or fitness
  197. for  any  particular  purpose.
  198.